<!DOCTYPE html>
<html>
{include file="public/head" /}
<body>
<div class="box-body">
        <form id="myform" class="myform form-horizontal"  method="post">
        <input type="hidden" name="timming_id" value="{$info['timming_id']|default=''}">
          <div class="row">
            <div class="col-md-12">
               <div class="input-group margin">
                <div class="input-group-btn">
                <span class="btn btn-default form-txt">任务名称：</span>               
                </div>
                <!-- /btn-group -->
                <input type="text" class="form-control" name="timming_name" value="{$info.timming_name|default=''}"  autocomplete="off">
              </div>
                <div class="input-group margin">
                <div class="input-group-btn">
                <span class="btn btn-default form-txt">任务描述：</span>
                </div>
                <!-- /btn-group -->
                <input type="text" class="form-control" name="timming_remark" value="{$info.timming_remark|default=''}">
              </div>                                                                           
               <div class="input-group margin">
                <div class="input-group-btn">
                <span class="btn btn-default form-txt">任务类型：</span>
                </div>
                <!-- /btn-group -->
                 <select name="timming_type" class="form-control select2" style="width: 100%;" tabindex="-1" aria-hidden="true">                        <option value="1">采集</option>
                        {notempty name="GLOBALS['config']['html']['url_html']"} 
                        <option value="2" {eq name="info.timming_type" value="2" }selected{/eq}>生成</option>
                        {/notempty} 
                </select>
              </div>
               <div class="input-group margin">
                <div class="input-group-btn">
                <span class="btn btn-default form-txt" style="position:absolute;top:0px;">采集设置：</span> 
                <span class="form-txt-hide"></span>               
                </div>
                <!-- /btn-group -->
             <div class="select-group-t w40 search" style="float:left">
            <select name="timming_api" class="form-control">
            {$apiurl} 
{volist name="collect_list" id="vo"}
<option value="{:http_build_query(array('sid'=>$vo['collect_cid'],'status'=>$vo['collect_status'],'type'=>$vo['collect_type'],'apiid'=>$vo['collect_id'],'apiurl'=>$vo['collect_url'],'param'=>base64_encode($vo['collect_other'])))}">{$i}.{$vo.collect_name}{$vo.collect_title}</option>
{/volist}
</select>
</div>
<div class="select-group-t w200 search" style="float:left;margin-left:5px;">
    <select name="timming_ac" class="select2 form-control">
	<option  value="&ac=day&h=24">采集当天</option>
    <option  value="&ac=week&h=98">采集本周</option>
    <option  value="&ac=day&h=720">采集本月</option>
    <option  value="&ac=all">采集全部</option>
    <option  value="&ac=all&again=1">重新采集</option>
    </select>
    </div>
    <span style="float:left; margin-left:10px;" class="btn btn-facebook mark">生成采集参数</span>
    </div> 
    
                <div class="input-group margin">
                <div class="input-group-btn">
                <span class="btn btn-default form-txt">采集参数：</span>               
                </div>
                <!-- /btn-group -->
                <input type="text" class="form-control" name="timming_apiurl" value="{$info.timming_apiurl|default=''}"  autocomplete="off">
              </div>   
  
              <div class="input-group margin">
                <div class="input-group-btn">
                <span class="btn btn-default form-txt">采集间隔时间：</span>               
                </div>
                <!-- /btn-group -->
                <input type="text" class="form-control w200" name="timming_cjtime" value="{$info.timming_cjtime|default=''}"  placeholder="单位分钟，默认0不采集" >
              </div> 
              
                <div class="input-group margin">
                <div class="input-group-btn">
                <span class="btn btn-default form-txt">静态生成设置：</span>
                </div>
                <!-- /btn-group -->
                <div class="w200">
 <select name="timming_htmlaction" class="form-control select2">
<!-- <option  value="ac=vod&time=1&jump=1" {eq name="info.timming_htmlaction" value="ac=vod&time=1&jump=1"}selected{/eq}>生成上次生成后的内容</option>
<option  value="ac=vod&day=today&jump=1" {eq name="info.timming_htmlaction" value="ac=vod&day=today&jump=1"}selected{/eq}>生成全站当天数据</option>

{volist name=":config('model')" id="vo"}
{notin name="vo.id" value="8,9,11,13,14,15"}
<option  value="ac={$vo.name}&day=today&jump=1" {eq name="info.timming_htmlaction" value="ac={$vo.name}&day=today&jump=1"}selected{/eq}>生成当天{$vo.title}内容</option>
<option  value="ac=list&sid={$vo.id}&jump=1" {eq name="info.timming_htmlaction" value="ac=list&sid={$vo.id}&jump=1"}selected{/eq}>生成{$vo.title}分类</option>
<option value="ac={$vo.name}">生成全部{$vo.title}内容</option>
{/notin}
{/volist}
    <option  value="ac=index" {eq name="info.timming_htmlaction" value="ac=index"}selected{/eq}>生成首页</option>
    <option  value="ac=my" {eq name="info.timming_htmlaction" value="ac=my"}selected{/eq}>生成单页</option>-->
  <option  value="">关闭</option>
<option  value="ac=vod&time=1&jump=1" {eq name="info.timming_htmlaction" value="ac=vod&time=1&jump=1"}selected{/eq}>生成上次生成后的内容</option>
<option  value="ac=vod&day=today&jump=1" {eq name="info.timming_htmlaction" value="ac=vod&day=today&jump=1"}selected{/eq}>生成全站当天数据</option>

<option  value="ac=vod&day=today&jump=1" {eq name="info.timming_htmlaction" value="ac=vod&day=today&jump=1"}selected{/eq}>生成当天视频内容</option>
<option  value="ac=list&sid=1&jump=1" {eq name="info.timming_htmlaction" value="ac=list&sid=1&jump=1"}selected{/eq}>生成视频分类</option>
<option value="ac=vod" {eq name="info.timming_htmlaction" value="ac=vod"}selected{/eq}>生成全部视频内容</option>
<option  value="ac=news&day=today&jump=1" {eq name="info.timming_htmlaction" value="ac=news&day=today&jump=1"}selected{/eq}>生成当天文章内容</option>
<option  value="ac=list&sid=2&jump=1" {eq name="info.timming_htmlaction" value="ac=list&sid=2&jump=1"}selected{/eq}>生成文章分类</option>
<option value="ac=news">生成全部文章内容</option>
<option  value="ac=star&day=today&jump=1" {eq name="info.timming_htmlaction" value="ac=star&day=today&jump=1"}selected{/eq}>生成当天明星内容</option>
<option  value="ac=list&sid=3&jump=1" {eq name="info.timming_htmlaction" value="ac=list&sid=3&jump=1"}selected{/eq}>生成明星分类</option>
<option value="ac=star">生成全部明星内容</option>
<option  value="ac=story&day=today&jump=1" {eq name="info.timming_htmlaction" value="ac=story&day=today&jump=1"}selected{/eq}>生成当天剧情内容</option>
<option  value="ac=list&sid=4&jump=1" {eq name="info.timming_htmlaction" value="ac=list&sid=4&jump=1"}selected{/eq}>生成剧情分类</option>
<option value="ac=story">生成全部剧情内容</option>
<option  value="ac=role&day=today&jump=1" {eq name="info.timming_htmlaction" value="ac=role&day=today&jump=1"}selected{/eq}>生成当天角色内容</option>
<option  value="ac=list&sid=5&jump=1" {eq name="info.timming_htmlaction" value="ac=list&sid=5&jump=1"}selected{/eq}>生成角色分类</option>
<option value="ac=role">生成全部角色内容</option>
<option  value="ac=actor&day=today&jump=1" {eq name="info.timming_htmlaction" value="ac=actor&day=today&jump=1"}selected{/eq}>生成当天演员表内容</option>
<option  value="ac=list&sid=6&jump=1" {eq name="info.timming_htmlaction" value="ac=list&sid=6&jump=1"}selected{/eq}>生成演员表分类</option>
<option value="ac=actor">生成全部演员表内容</option>
<option  value="ac=tv&day=today&jump=1" {eq name="info.timming_htmlaction" value="ac=tv&day=today&jump=1"}selected{/eq}>生成当天节目内容</option>
<option  value="ac=list&sid=7&jump=1" {eq name="info.timming_htmlaction" value="ac=list&sid=7&jump=1"}selected{/eq}>生成节目分类</option>
<option value="ac=tv">生成全部节目内容</option>
<option  value="ac=special&day=today&jump=1" {eq name="info.timming_htmlaction" value="ac=special&day=today&jump=1"}selected{/eq}>生成当天专题内容</option>
<option  value="ac=list&sid=10&jump=1" {eq name="info.timming_htmlaction" value="ac=list&sid=10&jump=1"}selected{/eq}>生成专题分类</option>
<option value="ac=special">生成全部专题内容</option>
<option  value="ac=part&day=today&jump=1" {eq name="info.timming_htmlaction" value="ac=part&day=today&jump=1"}selected{/eq}>生成当天剧集内容</option>
<option  value="ac=list&sid=12&jump=1" {eq name="info.timming_htmlaction" value="ac=list&sid=12&jump=1"}selected{/eq}>生成剧集分类</option>
<option value="ac=part" {eq name="info.timming_htmlaction" value="ac=part"}selected{/eq}>生成全部剧集内容</option>
    <option  value="ac=index" {eq name="info.timming_htmlaction" value="ac=index"}selected{/eq}>生成首页</option>
    <option  value="ac=my" {eq name="info.timming_htmlaction" value="ac=my"}selected{/eq}>生成单页</option>

    </select> 
              </div>
              </div>
               <div class="input-group margin">
                <div class="input-group-btn">
                <span class="btn btn-default form-txt">生成间隔时间：</span>              
                </div>
                <!-- /btn-group -->
                <input type="text" class="form-control w200" name="timming_htmltime" value="{$info.timming_htmltime|default='0'}"  placeholder="单位分钟，默认0不生成,生成当天更新添加的内容与分类页面" >
              </div>              
               <div class="input-group margin">
                <div class="input-group-btn">
                <span class="btn btn-default form-txt">任务密码：</span>              
                </div>
                <!-- /btn-group -->
                <input type="text" class="form-control w200" name="timming_password" value="{$info.timming_password|default=''}">
              </div> 
                                         
                <div class="input-group margin">
                <div class="input-group-btn">
                <span class="btn btn-default form-txt">任务状态：</span>
                </div>
                <!-- /btn-group -->
                 <select name="timming_status" class="form-control select2 w200" tabindex="-1" aria-hidden="true">                       
                  <option value="1">启用</option>
                        <option value="0" {eq name="info.timming_status" value="0" }selected{/eq}>禁用</option>
                </select>
              </div>
                           
              </div>
                                    
          </div>
          <!-- /.row -->
        <div class="box-footer {notempty name=":request()->param('dialog')"}hidden{/notempty} layer-footer">
          <div  class="footer-btn">
               <button type="submit" class="btn btn-success btn-embossed">确定</button>
               <button type="reset" class="btn btn-default btn-embossed">重置</button>
               {notempty name=":request()->param('dialog')"}
               <button type="reset" class="btn btn-primary btn-embossed btn-close" onClick="layer.closeAll();"> 关闭</button>
               {/notempty}
            </div>
       </div>
       <!-- /.box-footer -->     
</form>
</div>
<!-- /.box-body -->    
{include file="public/footer" /}
<script type="text/javascript">
$(document).ready(function(){
	zanpian.cms.config();
		$(document).on("click", ".mark", function(e) {
			var api = $("select[name='timming_api'] option:selected").val();
			var ac = $("select[name='timming_ac'] option:selected").val();
			var url=decodeURIComponent(api+ac);
			var val = $("input[name='timming_apiurl']").val();
            if(val!=''){
			      val = val+','+url;
		    }else{
			      val = url;
		    }			
			$("input[name='timming_apiurl']").val(val);
			
		});	
});	
</script>
</body>
</html>
